<?
 include_once "db.php";
 $GetLogin = mysql_query("SELECT * FROM helpdesk_users WHERE username = '".$_POST[username]."' AND password = '".$_POST[password]."'" );
$Login = mysql_fetch_object($GetLogin);
	if ($Login->HD_user_ID && $Login->status != '0'  ) {
	  
    session_start();
    $_SESSION['ID'] = $Login->HD_user_ID;
	header ("Location: index.php");
	}
 else {
 	
	 header ("Location: login.php?error=true");
}

?>
